﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="News.aspx.cs" Inherits="NJL.Web.News" %>

<%@ Import Namespace="Royalsoft.Common" %>
<%@ Register Src="Controls/WUCHeader.ascx" TagName="WUCHeader" TagPrefix="uc1" %>
<%@ Register Src="Controls/WUCFooter.ascx" TagName="WUCFooter" TagPrefix="uc2" %>
<%@ Register Src="Controls/WUCELPS.ascx" TagName="WUCELPS" TagPrefix="uc3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="/Styles/base1.css" />
    <script type="text/javascript" language="javascript" src="/Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" language="javascript" src="/Scripts/jquery.KinSlideshow-1.1.js"></script>
    <script src="/Scripts/popup_layer.js" type="text/javascript"></script>
    <script type="text/javascript">
        function GetValidate() {
            document.getElementById("Validate").src = "/ValidateCode.aspx?rand=" + Math.random();
        }  
    </script>
</head>
<body>
    <%
        if (UserId == "" || UserName == "")
        {         
    %>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            //示例9，综合效果
            var t9 = new PopupLayer({ trigger: "#txtComment", popupBlk: "#blk9", closeBtn: "#close9", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            t9.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById('Login').src = '<%=WEBSITE_USRE_DOMAIN %>/SecondLogin.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=Request.RawUrl %>';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        });
    </script>
    <%
        }
    %>
    <form id="form1" runat="server">
    <uc1:WUCHeader ID="WUCHeader1" runat="server" />
    <!--主要内容-->
    <div class="clearfix w1003" id="content">
        <!--顶部推广-->
        <div class="blank cleanFlex">
        </div>
        <div>
            <!--左侧-->
            <div class="f_left" style="overflow: hidden; width: 675px;">
                <!--位置-->
                <div class="place02">
                    <p>
                        您现在的位置是：<a href="/">首页</a>>><span><a href="/xckb/">乡村快报</a>>></span><span><a href="/xckb/<%=MODEL_TYPE.TYPE_CODE %>/"><%=MODEL_TYPE.TYPE_NAME %></a></span><span>>><%if (MODEL.NEWS_TITLE.Length > 25) Response.Write(MODEL.NEWS_TITLE.Substring(0, 25)); else Response.Write(MODEL.NEWS_TITLE); %></span>
                    </p>
                </div>
                <div class="blank cleanFlex">
                </div>
                <div class="box mainNew cont">
                    <!--标题-->
                    <div class="newstitle  m_top_10">
                        <h2>
                            <%if (MODEL.NEWS_TITLE.Length > 23) Response.Write(MODEL.NEWS_TITLE.Substring(0, 23)); else Response.Write(MODEL.NEWS_TITLE); %></h2>
                        <p class="info">
                            <span>
                                <%=Convert.ToDateTime(MODEL.PUBLISH_DATE_TIME).ToString("yyyy-MM-dd HH:mm:ss") %></span><span>来源：农家乐网</span>
                        </p>
                    </div>
                    <!--简介-->
                    <div class="introduction  m_top_10">
                        <p>
                            <%=MODEL.NEWS_SUBJECT_TITLE %></p>
                    </div>
                    <!--图片-->
                    <div class="newscont font14 m_top_10 centeralign">
                        <img src="<%=GetImageUrl(MODEL.IMAGE_CODE,"5") %>" alt="" />
                    </div>
                    <!--主要内容-->
                    <div class="newscont font14 m_top_10">
                        <asp:Repeater ID="rptContent" runat="server">
                            <ItemTemplate>
                                <%#Eval("newsContent")%>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div id="pager" runat="server" class="pageBord cleanFlex m_top_10">
                    </div>
                    <div style="margin: 10px auto; width: 300px;">
                        <!-- JiaThis Button BEGIN -->
                        <div id="jiathis_style_32x32">
                            <a class="jiathis_button_qzone"></a><a class="jiathis_button_tsina"></a><a class="jiathis_button_tqq">
                            </a><a class="jiathis_button_renren"></a><a class="jiathis_button_kaixin001"></a>
                            <a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jtico jtico_jiathis"
                                target="_blank"></a><a class="jiathis_counter_style"></a>
                        </div>
                        <script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
                        <!-- JiaThis Button END -->
                    </div>
                    <div class="blank cleanFlex">
                    </div>
                </div>
                <!--评论-->
                <div class="blank cleanFlex">
                </div>
                <div class="box">
                    <div class="titleSpace titleGraySpace">
                        <h2>
                            评论</h2>
                    </div>
                    <div class="cont">
                        <!--留言内容-->
                        <div class="messageCont m_top_10">
                            <asp:Repeater ID="rptCommentList" runat="server" OnItemDataBound="rptCommentList_ItemDataBound">
                                <ItemTemplate>
                                    <dl class="imglist cleanFlex">
                                        <dt><a href="/wanjia/<%#Eval("CREATE_USER_ID") %>-index.html" target="_blank">
                                            <asp:Image ID="imgUserHead" runat="server" Width="67px" Height="50px" CssClass="picBor"
                                                BorderWidth="1"></asp:Image>
                                        </a></dt>
                                        <dd>
                                            <h3>
                                                <a href="/wanjia/<%#Eval("CREATE_USER_ID") %>-index.html" target="_blank">
                                                    <%#Eval("CREATE_USER_NAME")%></a></h3>
                                            <span>
                                                <%#Eval("CREATE_DATE_TIME")%></span></dd>
                                        <dd>
                                            <%#Eval("NEWS_COMMENT")%></dd>
                                        <dd class="cleanFlex">
                                        </dd>
                                    </dl>
                                </ItemTemplate>
                            </asp:Repeater>
                        </div>
                    </div>
                </div>
                <!--发帖区-->
                <div class="post">
                    <p class="titPost">
                        <strong class="font14">我要评论</strong>有<span><asp:Literal ID="litCommentCount" runat="server"></asp:Literal></span>人参与</p>
                    <p style="display: none">
                        用户名：<input type="text" class="input" maxlength="20" />密码：<input type="password" class="input" />
                    </p>
                    <p>
                        <asp:TextBox ID="txtComment" runat="server" Height="50px" TextMode="MultiLine" class="box"
                            Width="650px"></asp:TextBox>
                    </p>
                    <p class="m_top_10">
                        <span class="f_right">
                            <asp:Button ID="btnComment" runat="server" class="postbtn" OnClientClick="return check()"
                                OnClick="btnComment_Click" />
                        </span>验证码：<asp:TextBox ID="txtValidate" runat="server" class="input" Width="60px"
                            MaxLength="4"></asp:TextBox>&nbsp;&nbsp;<img id="Validate" onclick="javascript:GetValidate()"
                                alt="验证码" title="看不清，点击图片，换一张" align="absmiddle" src="/ValidateCode.aspx" style="cursor: pointer" /></p>
                    <p>
                        网友评论仅供其表达个人看法，并不表明本站同意其观点或证实其描述。
                    </p>
                </div>
                <!--推荐阅读-->
                <div class="m_top_10 box">
                    <div class="titleLocal">
                        <h2>
                            推荐阅读</h2>
                    </div>
                    <div class="cont">
                        <div class="f_left" style="width: 100%;">
                            <ul class="arrowList02">
                                <%
                                    for (int i = 0; i < LIST_SYS_NEWS.Count; i++)
                                    {
                                %>
                                <li><span>[<%=LIST_SYS_NEWS[i].PUBLISH_DATE_TIME.Value.ToString("yyyy-MM-dd HH:mm:ss")%>]</span> <a
                                    target="_blank" title="<%=LIST_SYS_NEWS[i].NEWS_TITLE %>" href="/xckb/<%=LIST_SYS_NEWS[i].TYPE_CODE %>/<%=LIST_SYS_NEWS[i].ID %>.html">
                                    <%if (LIST_SYS_NEWS[i].NEWS_TITLE.Length > 32) Response.Write(LIST_SYS_NEWS[i].NEWS_TITLE.Substring(0, 32) + "..."); else Response.Write(LIST_SYS_NEWS[i].NEWS_TITLE); %></a></li>
                                <% 
                                    }
                                %>
                            </ul>
                        </div>
                    </div>
                    <div class="cleanFlex">
                    </div>
                </div>
            </div>
            <!--右侧-->
            <div class="f_right" style="width: 316px; overflow: hidden;">
                <uc3:WUCELPS ID="WUCELPS1" runat="server" />
            </div>
        </div>
    </div>
    <div class="blank cleanFlex">
    </div>
        <div id="blk9" class="blk">
            <div class="popup_title">
                <span class="f_right"><a href="javascript:void(0)" id="close9">关闭</a></span>
                <ul>
                    <li class="now">
                        <a href="<%=WEBSITE_USRE_DOMAIN %>/SecondLogin.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=Request.RawUrl %>" target="main">登录</a>
                    </li>
    
                </ul>
            </div>
            <div>
                <iframe id="Login" name="main" width="500"
                    height="420" style="overflow:hidden; border:none;" frameborder="no" border="0"></iframe>
            </div>
        </div>
    <uc2:WUCFooter ID="WUCFooter1" runat="server" />
    </form>
    <script type="text/javascript">
        function check() {
            var comment = $('#<%=txtComment.ClientID %>').val();
            comment = $.trim(comment);
            if (comment == "") {
                alert("评论内容不能为空哦^_^");
                return false;
            }
            if (comment.length > 100) {
                alert('评论内容不能超过100个字哦^_^');
                return false;
            }
            var txtValidate = document.getElementById("<%=txtValidate.ClientID %>").value;
            txtValidate = $.trim(txtValidate);
            if (txtValidate == "") {
                alert("验证码不能为空哦^_^");
                return false;
            }
        }    
    </script>
</body>
</html>
